from app01 import models
from rest_framework import serializers


class AdminSerializer(serializers.ModelSerializer):
    class Meta:
        model = models.Admin
        fields = '__all__'

class AdminRoleSerializer(serializers.ModelSerializer):
    class Meta:
        model = models.AdminRole
        fields = 'id, admin_id'



class ResourceSerializer(serializers.ModelSerializer):
    class Meta:
        model = models.Resource
        fields = '__all__'


class RoleSerializer(serializers.ModelSerializer):
    class Meta:
        model = models.Role
        fields = '__all__'


class RoleResourceSerializer(serializers.ModelSerializer):
    class Meta:
        model = models.RoleResource
        fields = '__all__'
